package com.hhb.juc;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.ReentrantLock;

public class Test01 {
    public static void main(String[] args) {
        /**Lock lock = new ReentrantLock(false);
        lock.lock();
        lock.tryLock();
        lock.unlock();
        LockSupport.park();

         */

        BlockingQueue<Integer> blockingQueue = new LinkedBlockingQueue<>(10);

        try {
            Integer take = blockingQueue.take();
            System.out.println(take);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }



    }
}
